Skip to content

Add C++20 awaitable I/O helpers for co20 - #33

Merged
dallison merged 1 commit into
mainfrom
co20-awaitable-io
Nov 22, 2026
Merged

dallison merged 1 commit into
mainfrom
co20-awaitable-io

Conversation

@dallison

Copy link
Copy Markdown
Owner

Summary

  • Add toolbelt::await::* ValueTask wrappers (//toolbelt:toolbelt_co20) so FileDescriptor / Pipe / Socket yield and wait correctly under stackless co20 coroutines (co_await instead of blocking AsyncWaiter::Wait/Yield).
  • Pin @coroutines to dallison/co 3.5.0 and bump the module version to 2.2.0.
  • Document the C++20 path in the README and clarify the AsyncWaiter limitation for stackless coroutines.

Test plan

  • bazel test //toolbelt:co20_test --config=apple_silicon
  • bazel test //toolbelt:pipe_test //toolbelt:sockets_test --config=apple_silicon
  • CI green on the PR

Stackless co20 coroutines cannot suspend inside AsyncWaiter::Wait/Yield, so
the existing pointer-based APIs would block the scheduler. Add
toolbelt::await::* ValueTask wrappers (and //toolbelt:toolbelt_co20), pin
coroutines to 3.5.0, and bump the module version to 2.2.0.
@dallison
dallison merged commit f41e367 into main Nov 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant